﻿<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>test function</title>
		<script type="text/javascript">
		var setup = function(){
			var count = 0;
			return function(){
				return (count += 1);
			}
		}
		
		var next = setup();
		for(var i=0;i<3;i++){
			console.log("result is: " + next());
		}
		</script>
	</head>
	<body></body>
</html>